package com.faceye.test.service.proxy;

public class BusinessProxy implements  BusinessUnit{

    private  BusinessUnit bu =null;
    @Override
    public void doBusinuess() {
        if(bu==null){
            bu=new BusinessUnitImpl();
        }
        before();
        bu.doBusinuess();
        after();
    }

    private void before() {
        System.out.println("before");
    }
    private void after(){
        System.out.println("after");
    }
}
